Dynamic LLM-Agent Network: An LLM-agent Collaboration Framework with Agent Team Optimization